<%@ page language="java" errorPage="/common/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<link href="../style.css" rel="stylesheet" type="text/css">
<link href="<c:url value='/admin/assets/style/jqueryform.css'/>" type="text/css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" media="screen" href="<c:url value='/admin/assets/js/jquery/jquery-validate.password/jquery.validate.password.css'/>" />
<script type="text/javascript" src="/assets/admin/js/util.js"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery.js'/>"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery.form.js'/>"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery-validate/lib/jquery.metadata.js'/>"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery-validate/jquery.validate.js'/>"></script>
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery-validate.password/jquery.validate.password.js'/>"></script>
<script type="text/javascript">
var options = {
	beforeSubmit: function()
	{
	},
	success: function(msg)
	{
		if(msg=="error")
		{
			alert("发送失败!");
		}
		else
		{
			alert("发送成功!");
		}
		$('#sendEmailButton').attr("disabled", false);
	},
	url: '/admin/system/systemEmailSend.ac',
	type: 'post',
	dataType: 'html',
	clearForm: false
};

$(document).ready(function() {
// 表单验证
		$("#SendEmailForm").validate({
			errorClass: "wrong",
			rules:
				{
					email:		{required: true,	email: true}
			},
			messages:
				{
					email: {
						required: "请输入Email. ",
						email: "请输入一个合法的Email."
					}
			},
			submitHandler: function()
			{
				$('#sendEmailButton').attr("disabled", "disabled");
				$('#SendEmailForm').ajaxSubmit(options);
			}
		});
});

</script>
</head>
<body class="main">
  <form id="SendEmailForm" name="SendEmailForm" method="post">
<table class="container" cellpadding="0" cellspacing="0">
<tr>
  <td>
<table class="dialog" align="center" cellpadding="0" cellspacing="0" width="450">
<tr><td>
<table class="header" cellpadding="0" cellspacing="0">
<tr>
<td>邮箱测试</td>
</tr>
</table>
</td></tr>
<tr>
  <td align="center" class="body" id="errorTd">&nbsp;</td>
</tr>
<tr>
  <td align="center" class="body">
  <table class="inputform" cellpadding="1" cellspacing="0" border="0" width="100%">
    <tr>
      <td width="20%" height="30" align="right" nowrap>目标邮件：</td>
      <td width="80%" height="30" align="left" nowrap class="formtabletdcontent"><input name="email" type="text" class="af-outputText" id="email" size="40%"/><br/> <label class="error" for="email" generated="true" ></label></td>
    </tr>
    <tr>
      <td height="30" align="right" nowrap>标题：</td>
      <td height="30" class="formtabletdcontent" nowrap align="left"><input name="title" type="text" class="af-outputText" id="title" value="邮件标题" size="40%"/></td>
    </tr>
    <tr>
      <td height="30" align="right" nowrap>内容：</td>
      <td height="30" class="formtabletdcontent" nowrap align="left">
        <textarea name="content" id="content" cols="45" rows="5">邮件内容</textarea>
      </td>
    </tr>
    <tr>
      <td height="20" colspan="2" align="center" nowrap class="formtabletdtitle">&nbsp;</td>
      </tr>
   
  </table>
  </td>
</tr>
<tr><td>
<table class="footer" cellpadding="0" cellspacing="0">
<tr><td><span class="formtabletdtitle">
  <input type="button" class="button" value=" 发 送 " id="sendEmailButton" onClick="$('#SendEmailForm').submit()">
</span></td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
  </form>

</body>
</html>
